package com.trainsmart.example.wizard.control
{
	import com.trainsmart.example.wizard.vo.PersonVO;
	import com.trainsmart.smartmvc.Context;
	import com.trainsmart.smartmvc.CtrlBase;
	import com.trainsmart.smartmvc.FlowUtil;

	public class SavePerson extends CtrlBase
	{
		public function SavePerson(context:Context)
		{
			super(context);
		}
		override public function execute(request:Object=null, response:Function=null):void
		{
			var vo:PersonVO = request as PersonVO;
			//save into database
			
			var args:Object = new Object();
			args.agree = false;
			if(vo.username!='')
				args.agree = true;
			//go to other
			var util:FlowUtil = new FlowUtil(context);
			util.forwardStep("successFlow", "SavePerson", args);
		}
		
	}
}